package com.lj.graduate.service.impl;

import cn.hutool.log.Log;
import com.lj.graduate.controller.dto.OrderDTO;
import com.lj.graduate.entity.Order;
import com.lj.graduate.mapper.OrderMapper;
import com.lj.graduate.mapper.ScenicDetailMapper;
import com.lj.graduate.mapper.UserMapper;
import com.lj.graduate.service.IOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ljy
 * @since 2023-03-24
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
    private static final Log LOG = Log.get();
    @Autowired
    private OrderMapper orderMapper;

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private ScenicDetailMapper scenicDetailMapper;

    public OrderDTO  getOrderDTO(OrderDTO orderDTO){
//        QueryWrapper<Order> queryWrapper = new QueryWrapper<>();

        return null;
    }

    @Override
    public List<OrderDTO> selectPage(Integer pageNum, Integer pageSize) {

        List<OrderDTO> data = orderMapper.selectPage(pageNum, pageSize);

        return data;

    }

    @Override
    public float sumPrice(){
        return orderMapper.sumPrice();
    }
}
